/*
 * server.h
 *
 *  Created on: 2022年8月2日
 *      Author: wocao
 */
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <string.h>
#include <iostream>
#include <thread>
#include <thread>
#include <unistd.h>
#include <sstream>
#include "../jiekouceng/Jiekou.h"
#include "../tools/TF_file.hpp"
#include "../cache/rw_status_cache/annular_cache/Annularcache.h"
#include "Clin.h"
using namespace std;
#ifndef SERVER_SERVER_H_
#define SERVER_SERVER_H_

class server {
public:
	map<string,Clin*> cnn;
	Cunchuti_kongzhi ckz;
	const int PORT = 8999;
	const int QUEUE = 40;
	server() = default;
	virtual ~server();
	void server_start();
	void chuli(int cont_id);
	void send_ok(const char* str,unsigned long len,int cont_id);
	void add_file_thread(Wenjian& wenjian,Annular_cache& ac,int cont_id);
	void recymem();
};

#endif /* SERVER_SERVER_H_ */
